package com.example.springboot_shopping.entity;
import com.baomidou.mybatisplus.annotation.*;
import java.util.Date;

@TableName("tab_user")
public class User {
    @TableId(value = "u_id", type = IdType.AUTO)
    private Integer uid;
    @TableField("u_name")
    private String uname;
    @TableField("u_password")
    private String upassword;
    @TableField("u_email")
    private String uemail;
    @TableField("u_phone")
    private String uphone;
    @TableField("u_register_time")
    private Date uregistertime;
    @TableField("u_status")
    @TableLogic  // 逻辑删除标记
    private Integer ustatus;

    public User() {}

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getUpassword() {
        return upassword;
    }

    public void setUpassword(String upassword) {
        this.upassword = upassword;
    }

    public String getUemail() {
        return uemail;
    }

    public void setUemail(String uemail) {
        this.uemail = uemail;
    }

    public String getUphone() {
        return uphone;
    }

    public void setUphone(String uphone) {
        this.uphone = uphone;
    }

    public Date getUregistertime() {
        return uregistertime;
    }

    public void setUregistertime(Date uregistertime) {
        this.uregistertime = uregistertime;
    }

    public Integer getUstatus() {
        return ustatus;
    }

    public void setUstatus(Integer ustatus) {
        this.ustatus = ustatus;
    }

    @Override
    public String toString() {
        return "User{" +
                "uid=" + uid +
                ", uname='" + uname + '\'' +
                ", upassword='" + upassword + '\'' +
                ", uemail='" + uemail + '\'' +
                ", uphone='" + uphone + '\'' +
                ", uregistertime=" + uregistertime +
                ", ustatus=" + ustatus +
                '}';
    }

    public User(Integer uid, String uname, String upassword, String uemail,
                String uphone, Date uregistertime, Integer ustatus) {
        this.uid = uid;
        this.uname = uname;
        this.upassword = upassword;
        this.uemail = uemail;
        this.uphone = uphone;
        this.uregistertime = uregistertime;
        this.ustatus = ustatus;
    }
}